If you have any problems or comments regarding VSamp, please email the author Malcolm Haylock at smaug@kagi.com or visit the VSamp web site at http://www.kagi.com/smaug/vsamp
Contents:
Introduction
Quick Demo
Registration
Overview
Using VSamp
OMS Thru
Using VSamp with Sound Cards
Version History
Introduction
VSamp is a long-awaited program that turns the Macintosh into an OMS and Sound Manager compatible multitimbral sample playback module. Configured like a simple sampler, VSamp can be setup to playback on 16 MIDI channels with up to 32 samples per channel, mapped and enveloped to user-defined configurations. This can then be driven by an OMS-compatible sequencer or the included application 'OMS Thru' running on the same computer.
Without registration, this program will stop playing a loaded bank after about four minutes from when the bank is loaded. The bank can be restarted with a single command. See the section "Registration" on how to obtain a fully operational version.
Quick Demo
1. If you don't yet have OMS 2.0 or later installed, download it from www.opcode.com or ftp.opcode.com and install it.
2. Launch 'VSamp' and choose Preferences from the Edit menu. Set the output resolution (8 or 16 bit) and sample rates to the same as shown in the Sound Out panel of the Sound control panel.
3. Choose Open from the File menu. Navigate to the folder 'Demo Bank' in the VSamp folder and open the file 'tenor sax.bank'.
4. Choose Load Bank from the Bank menu.
5. Launch 'OMS Thru' and hold down the mouse on the top bar, selecting the name of your controller keyboard and releasing the mouse. Similarly, hold down the mouse on the lower bar and select 'VSamp'. If VSamp doesn't appear in the pull down menu it means VSamp is not currently running.
6. Set your keyboard to transmit on MIDI channel 1 and play - you now have a sampled tenor saxophone!
7. If you have on OMS compatible sequencer, see you manual on routing MIDI to VSamp.
Registration
The version of VSamp included with this package requires a registration number, otherwise it will stop playing a loaded bank after about four minutes. The bank can be reloaded with a single command.
To obtain a registration number:
1) Launch the enclosed program "Register".
2) Type your name and email address in the upper left spaces provided.
3) Type how many single user licenses you require and if you'd like a site license or world licence in the spaces provided.
4) Choose your payment method from the pull-down menu in the lower left area. The quickest way is to pay by credit card then email or fax the details. All credit card details are encrypted when you email them.
For credit card: enter your credit card details then click the Copy... button. Go to your email program and paste into an a new message. Send this to sales@kagi.com
For cash, check and invoice: click the Print... button and send the form with your payment to the address on the printed form.
5) I will email a registration number as soon as I receive your details from kagi. Kagi handles payments only and does not provide technical support for VSamp.
Overview
Output resolution: 8 or 16 bit
Output frequency: 11025 to 44100 Hz
Sample Resolution: 8 or 16-bit (best with 16-bit)
Sample Frequency: any (best with 44.1kHz)
Polyphony: up to 32 (computer dependent) voices dynamically allocated
Sample mapping: 32 samples per instrument
Sample Memory: Depends on memory of computer.
Multitimbral: 16 instruments per bank assigned to unique MIDI channels.
MIDI Implementation: note on, note on velocity, note off (0x9X or 0x8X with 0 velocity), dynamic volume (ctrl 7), dynamic pan (ctrl 10), channel sustain pedal (ctrl 64), channel pitch bend, all notes off (ctrl 123).
MIDI compatibility: Requires OMS 2.0 or greater. (from www.opcode.com)
System Requirements
* Any powermac or older machine with 68020, 030, 040 processor . Will not run on MacPlus, SE, Classic, Powerbook 100 or original Mac Portable. Best with 16-bit sound as on all powermacs and Quadra 660AV and 840AV.
* OMS 2.0 or later (from ftp.opcode.com or www.opcode.com)
* Sound Manager 3.1 or later strongly recommended (included with System 7.5.3 and later).
* An OMS compatible sequencer or the included application 'OMS Thru'.
Polyphony
Polyphony is user-defined and depends on the processor speed. The only powermac I have run this on is a powermac 7200/90 which gives 16 note polyphony for 16-bit 44.1kHz sound without using 'high quality' pitch shifting and 9 notes with the higher quality pitch shifting. Using 22kHz sound will approximately double these values. Faster machines will give more up to a maximum of 32. Please let me know what performance different machines are capable of. If the polyphony is set too high, a disjointed sound will be heard due to breaks between the double buffering.
Sample Management
The three limitations imposed by the program on sample management are the number of samples that can be loaded, the total amount of memory which all samples occupy, and if you use sound resources to store samples, the length of any one sample. Samples are stored as either AIFF files or Macintosh sound resources. Shareware programs such as the excellent D-SoundPro can be used to record and edit samples on your Macintosh.
The maximum number of samples that can be loaded is in this case a fairly arbitrary number, but it was decided that 32 samples per instrument for each of the sixteen instruments (512 samples) is adequate in most cases. An Akai Sampler can only store 255 in total while an Emu sampler can store up to 1000.
The memory available to the samples is limited by the size of the application's heap. This value is set in the program's Get Info window accessed in the Finder. VSamp samples contain a header as well as the sample data, but the header size is insignificant with regard to memory allocation. The program has been tested with almost 6Mb of samples loaded without a problem and theoretically it could go much higher if more computer RAM was available.
The reliance on sound resources for the sample format limits the maximum size of any one sample. 'Inside Macintosh' mentions that resources should be kept below about 5 Mb, but as this represents almost a minute of 16-bit 44.1kHz mono sound, it is not really a concern unless the program is to be used primarily for triggering long samples. In this case a digital sequencer, such as Opcode's Studio Vision, would be a more appropriate tool, as long samples do not have to be resident in RAM and allows complete synchronisation between MIDI and digital audio. If you use AIFF files for sample storage there is no limitation on sample size;
MIDI Compatibility
The integration of this program into currently existing systems has been an important consideration in its design, and for this reason it was decided that the best MIDI system to use would be the 'Open Music System' (formerly ヤOpcode MIDI Systemユ) or OMS. This powerful MIDI programming library was written by Opcode to control the MIDI routing for their various hardware and software products, but it is soon to be adopted by Apple as the standard MIDI manager in the Macintosh. VSamp's MIDI routing operates by opening a virtual MIDI destination in OMS which is recognised by other OMS-compatible applications running concurrently. VSamp has been successfully used with Opcode's Vision, Steinberg's Cubase and Emagic's Logic family of sequencer programs.
Using VSamp
VSamp is a stand-alone application that can be launched from the Macintosh Finder. As stated earlier, the memory available to VSamp for storage of samples can be set from the program's Get Info box. Set the 'preferred size' to the maximum amount of RAM that would be free with the OMS sequencer running concurrently.
The VSamp interface is very simple to use in that it contains only four menus. The first is the File menu which allows the user to configure instruments and banks. The second menu is the Edit menu, containing the standard edit commands as well as the Preferences item where the polyphony, sound buffer size, output resolution, sample rate and headroom are set. The third menu is the Bank menu which is used for loading and unloading banks into RAM.
Setting the Sound Format
The type of sound output by VSamp needs to agree with the values set in the sound control panel for maximum efficiency. VSamp is capable of outputting sound as 8 or 16-bit numbers at various sample rates from 11 to 44.1 kHz. First go to the Sound control panel for your macintosh and select a sample resolution and rate. Then go to VSamp and set the same value in the Preferences item. The sample rate has a big effect on the polyphony and in general halving the sample rate will double the available polyphony. Therefore if you can make do with 22kHz sound, do so. The sample resolution has a much smaller impact on speed so if you have 16-bit sound available, use it.
Arranging Samples
The arrangement of sounds in VSamp is very straightforward. The most basic unit is the sample, stored as a Macintosh sound resource or AIFF file. These files contain all the necessary information about the sample, including base frequency (MIDI note), sample rate and loops. These values are set using either a commercial digital waveform editor such as Macromedia's 'SoundEdit 16', Passport's 'Alchemy' or Digidesign's 'Sound Designer' software or alternatively with such shareware programs as the excellent 'D-SoundPRO', 'Sound Effects', 'SndSampler' and ヤSoundHackユ available from info-mac. For accurately setting loops a waveform editor is recommended. Note that if you are using stereo samples only the 1st channel will be used.
The organisation of a group of samples (eg piano) across the keyboard is called an instrument. A VSamp instrument is created or edited with the commands New and Open respectively, chosen from the File menu.
Each line of this instrument is used to select a sample for this instrument and define it's lower and upper notes on the keyboard. Click the blue sample box (2nd column) to select the sample file. The next column is a pop-up menu of all the sound resources in the selected file. If the sample is an AIFF file this column will display 'AIFF' and can not be altered. The resources are listed by ID number and name, and selecting a resource displays it's number in the Resource box (3rd column). Next the lower and upper MIDI notes (A0-C8) are entered in the respective columns. You can use a MIDI keyboard to enter these values but you must have the application 'OMS Thru' running to route the MIDI from your keyboard to VSamp. These values can be entered as either numbers or names. If two samples overlap in note range, only the sample further down the list will be heard.
Clicking on the Envelope button brings up the window where you can enter the envelope characteristics for this instrument. The diagram explains what each item refers to. Note that all times are in 100ths of a second with a maximum of 9900 (99 secs). The sustain value is in percent of maximum amplitude. Click OK to save this envelope or Cancel to return to the previous values. Finally select Save from the File menu to save your instrument.
It is important to note that all samples and instrument files must reside in the same directory as the bank file, otherwise you will get an error message when trying to load a bank.
The instrument also contains a box marked 'Track'. Activating this means VSamp will use the sample's base note information to transpose the sample to the correct pitch. If you leave this box unchecked, VSamp will just play back the sample without transposing it. You will usually leave this box checked unless you are creating drum instruments where you don't want the samples transposed.
Arranging Instruments
The manner in which these instruments are assigned to MIDI channels constitutes a bank. Using New or Open from the File menu to create or edit a bank respectively, brings up a window with sixteen lines, one for each instrument.
Each line is used to assign a VSamp instrument to a MIDI channel. Simply select the instrument by clicking on one of the blue instrument boxes then type the MIDI channel (1-16) in the Channel column. If two instruments are given the same channel, only the instrument further down the list will be heard.
The pitch bend response is set on the top line. This is the number of semitones that a full bend activates. The maximum is 12 (1 octave)
Each line also includes a checkbox for higher quality (but slower) pitch shifting of the sample. Enabling the checkbox 'HiQ' will use interpolation for this instrument but will reduce available polyphony.
Finally select Save to save the bank.
Loading a Bank
A VSamp bank is loaded into memory using the Load Bank command from the Bank menu. This command is only available when a bank is open and is the front document (choose from the Windows menu if needed). This command opens each of the files referenced by the various instruments in the bank and loads the relevant samples into memory, assigning each to a range of notes for it's particular MIDI channel. Appropriate error messages are given for such problems as not being able to find files or resources, or running out of memory. If the program can't find a file, check that all samples and instrument files are in the same directory as the bank file. Note that the bank loaded is as the window shows, not how the bank was last saved. On the contrary though, any instruments loaded are as they are saved to disk.
Unloading a Bank
When a bank is loaded the processor will be doing much extra processing even when no sound is playing. Choosing Unload Bank prevents this when you need the processor for other tasks. A currently loaded bank is also unloaded when you choose Preferences from the Edit menu.
Accessing VSamp from Sequencer
VSamp has only been tested with Opcodeユs ヤVisionユ and ヤStudio Visionユ, Steinberg's 'Cubase' and Emagic's 'Logic' sequencers but should work with any OMS 2-compatible sequencer, provided the user is running OMS 2.0 or later.
For users of Vision or Studio Vision, the loaded sounds can be accessed as follows. Once a bank has been loaded by VSamp, switch to Vision and open the Instruments window. From the pull down menu in the title bar of this window, select New Instrument which adds a Vision instrument to the bottom of the list. The first column is the name of the instrument as used by the sequencer and can be edited. The destination is selected by clicking and holding the button on the name in the device menu. This should produce a list of names, one of which should be VSamp. Finally select the MIDI channel for this instrument. Add as many instruments as MIDI channels that are required, assigning a MIDI channel to each instrument. Note that channels do not have to be unique if the instruments do not overlap in key range. For example, it is possible to divide the keyboard into two (or more) segments assigning a different instrument to each. Once done, VSampユs bank should now be accessible from Vision as with any other MIDI device.
Setting the Polyphony
VSamp requires you to set the polyphony to avoid breaks in the audio signal. A simple test needs to be carried out. Load a bank into VSamp and with the sustain pedal down play up a scale, counting the notes until the sound deteriorates. Set this number (minus two for headroom) in the poyphony field from the Preferences item in the Edit menu. Note that if you push the computer too hard the computer is more likely to crash and there will not be enough power to run a sequencer in the foreground. Polyphony is also determined by how many instruments in each bank have their "Hi Quality" checkboxes set. It's best to test the polyphony with this box checked.
Fine Tuning the Program
Other fields that can be set in the preferences are the size of the sound buffers, the output sound format and the headroom. The default of 240 for the buffer size (with 44.1kHz output) is a good compromise between the responsiveness of the program and the polyphony. A smaller number will make the program react faster and give smoother envelopes but will reduce the available polyphony. The program will not let you set a value lower than 32 or higher than 512. Increasing this value gives more polyphony but slows the responsiveness. Please play around with this value and let me know what you think is best.
The headroom setting sets the output level of VSamp and defaults to 12dB. Setting a value closer to 0dB will give a stronger output and better quality sound but will more likely distort with multiple voices. If you don't use many voices you can set this to 0dB but beware - the distortion when it happens is severe! For higher polyphony settings I suggest you leave this at 12dB or even 18dB.
OMS Thru
OMS Thru is a program written by Opcode which acts as a simple MIDI patchbay for OMS. After installing OMS 2.x, you can use this program to route the MIDI messages from a source (top pull-down menu) to a destination (bottom menu). After starting VSamp, it should appear as a destination in OMS Thru.
Using VSamp with Soundcards
VSamp has been tested with the Pro Audio Spectrum 16 sound card which doesn't support multichannel sound. Since VSamp only uses one sound channel this is not a problem as long as other applications don't require sound channels. I have found that Opcode's Vision sequencer allocates a sound channel during playback and record which stops VSamp playing. The way to prevent this is as follows:
1) Go to the Sound Out panel of the Sound control panel and select the output device that you want VSamp to use (PAS16 card)
2) Launch VSamp and load a bank. This is when VSamp opens it's sound channel.
3) Go to the Sound Out panel of the Sound control panel and select a different output device that other applications can use (MAC internal).
4) Launch the sequencer or other application.
The VSamp sound will then go to the sound card and other applications will send sound to the Mac which shouldn't upset VSamp. Whenever you load a new bank you will have to change the Sound Out panel of the Sound control panel to your soundcard before you load the bank, then back again before you continue.
Version History:
1.4.1, 17th April 1996:
Initial release.
1.5.0, 8th Sep 1996:
1) Included interpolation option for pitch shifting of each instrument in a bank to improve sound quality.
2) Reinitialise the sound channel each time a bank is loaded to allow for changes in the preferences and sound control panel.
3) Fix bug that causes VSamp to crash if OMS not installed.
4) Compatibility with 8-bit resources with extended headers.
5) Compatibility of envelope resource between 68k and PPC versions.
6) Increase demo time to four minutes.
7) Fixed Bug in OMS Thru that caused it to crash when VSamp was quit when also selected as output device.
8) Update to OMS developers kit 960523.
2.0.0, 26th Jan 1997:
1) Completely rewrote interface to be more friendly including:
Standard File menu commands to open, close and save documents.
Implemented edit scrap commands.
Multiple windows open at once slectable with Window menu.
Increased max number of samples to 32 per instrument.
68k Macs can now use 16 instruments.
2) Fixed a bug in envelope routine.
3) Fixed a bug whereby unlooped samples were sometimes trying to read past end.
2.0.1, 15th Mar 1997:
1) Fixed tuning error for samples with small loops and reworked looping code.
2.1.0, 17th May 1997:
1) Added support for AIFF files.
2) Allowed multiple sound channels for same note.
3) Added 'Track' switch in instrument.
4) Registration no longer reset when preferences file trashed.
5) Improved memory management and fixed memory purging error when time limit expires.
6) Added headroom preference.
7) Hitting Return or Enter while in a text edit field now enters data.
2.1.1, 21st May 1997:
1)Fixed MIDI Buffer Overflow reporting when no bank is loaded.
2.1.2, 2nd June 1997:
1)Fixed clicking problem at end of some unlooped samples.